Skip to content

feat(us3): implement users-api operational contract - #21

Merged
EstebanGZam merged 2 commits into
mainfrom
feat/us3-operational-contract
Aug 31, 2026
Merged

feat(us3): implement users-api operational contract#21
EstebanGZam merged 2 commits into
mainfrom
feat/us3-operational-contract

Conversation

@EstebanGZam

@EstebanGZam EstebanGZam commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What changes

Users API now exposes distinct public startup, readiness, and liveness groups,
propagates safe request correlation into responses and logs, uses the
OpenTelemetry Micrometer bridge with Zipkin export, rejects malformed signed
JWTs as 401 responses, emits service and HTTP metrics, and loads only non-secret
default-off operational configuration. Unused generated form-login credentials
and detailed health output are disabled.

Why

The service previously exposed aggregate health details, used Brave rather than
the required OpenTelemetry bridge, had no correlation contract, and allowed a
malformed signed JWT payload to escape the filter as a server error. It also
enabled Spring's unused generated password, which placed credential material in
startup logs.

The first failing test commit (42b22c8) is already on main and currently
makes its CI red; this PR supplies the implementation that the test-first commit
specified and records that base-branch condition explicitly.

Tasks

  • gitops specs/009-full-platform-rollout T076
  • gitops specs/009-full-platform-rollout T081
  • The task register is updated in this pull request — cross-repository delivery requires a paired microservice-app-gitops PR because the authoritative register is not in this repository.
  • Every task ticked here was verified by locating its artifact; no task is ticked in this repository.

Paired changes: MicroTodoSuite/microservice-app-frontend#21 and
MicroTodoSuite/microservice-app-gitops#85.

How it is verified

  • Before implementation, commit 42b22c8 failed compilation because OperationalProperties and the OpenTelemetry API were absent.
  • Commit ae74775 added the malformed-signed-JWT regression while implementation files remained unstaged, preserving the red test-first state.
  • Pinned Java 21 image: mvn -B -ntp clean verifyTests run: 13, Failures: 0, Errors: 0, Skipped: 0; BUILD SUCCESS.
  • npx --yes @stoplight/spectral-cli@6 lint contracts/openapi.yaml --ruleset .spectral.yaml — no errors or warnings.
  • docker build --progress=plain -t microtodosuite/users-api-us3:local . — image build completed and repeated all 13 tests under Java 21.
  • The local non-root image runtime check returned 200 UP responses from /health/startup, /health/readiness, and /health/liveness, echoed X-Request-Id, logged only the default-off operational object, and contained neither the supplied JWT secret nor a generated Spring password in logs.

The full stack conformance run was not executed locally; PR CI remains the
blocking integration and supply-chain check.

Risk and rollback

The tracing bridge change can affect span export, and the readiness group now
depends on H2. Runtime and context tests exercise both. Rollback is to revert
this PR's merge commit; no data or infrastructure migration is included.

What this PR does not do

It does not change GitOps probes or overlays, deploy the image, activate a
full-profile cluster, or suppress any existing dependency/security finding.

@EstebanGZam
EstebanGZam merged commit 6f00904 into main Aug 31, 2026
6 checks passed
@EstebanGZam
EstebanGZam deleted the feat/us3-operational-contract branch August 31, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant